package com.zy.kotlinmvplib

import com.zy.kotlinbaselibrary.rx.Optional
import com.zy.kotlinbaselibrary.rx.RxResultHelper
import com.zy.kotlinbaselibrary.rx.RxSchedulerHelper
import com.zy.kotlinmvplib.api.NetWorks
import io.reactivex.Observable

class MainModel: MainContract.Model {
    override fun getData1(): Observable<Optional<bean>> {
       return NetWorks.instance.apiService
           .test1("00d91e8e0cca2b76f515926a36db68f5", "13594347817", "123654")
           .compose(RxResultHelper.handle_result())
           .compose(RxSchedulerHelper.io_main())

    }

    override fun getData(): Observable<Optional<bean>> {
       return NetWorks.instance.apiService
           .test()
           .compose(RxSchedulerHelper.io_main())
           .compose(RxResultHelper.handle_result())

    }
}